<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>左右摇摆</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #1c1f2f;
        }

        .container {

            -webkit-box-reflect: below 5px -webkit-gradient(linear,
                    left top, left bottom,
                    from(rgba(0, 0, 0, 0)),
                    to(rgba(255, 255, 255, 0.5)));
        }

        .loader {
            position: relative;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            border: 20px solid transparent;
            border-bottom-color: #09e5ec;
            border-right-color: #09e5ec;
            transform: rotate(45deg);
            animation: move 4s ease-in-out infinite alternate;
        }

        .ball {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            animation: move1 4s ease-in-out infinite alternate;
        }

        .ball::before {
            content: "";
            position: absolute;
            bottom: 20px;
            left: 20px;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background-color: #fff;

        }

        @keyframes move {
            0% {
                transform: rotate(0);
            }

            100% {
                transform: rotate(90deg);
            }
        }

        @keyframes move1 {
            0% {
                transform: rotate(0);
            }

            100% {
                transform: rotate(-180deg);
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="loader">
            <div class="ball">

            </div>
        </div>
    </div>
</body>

</html>